<?php
class LayoutsForm extends Zend_Form {
    public function __construct($options = null) 
    {
    	$baseurl 	= new MHDEV_View_Helper_BaseUrl();
    	$translate	= Zend_Registry::get('lang');
    	
        parent::__construct($options);
        
        $this->setName('layouts');
        
        // title
        $title = new Zend_Form_Element_Text('title');
        $title->setLabel($translate->_('admin_layouts_title'));
        $title->setRequired(true);
        $title->addValidator('NotEmpty');
        $title->setErrorMessages(array(
            0 => $translate->_('admin_layouts_error')
        ));
        
        // key
        $key = new Zend_Form_Element_Text('key');
        $key->setLabel($translate->_('admin_layouts_key'));
        $key->setDescription($translate->_('admin_layouts_dkey'));
 		
		// public
		$public = new Zend_Form_Element_Checkbox('is_public');
		$public->setLabel($translate->_('admin_layouts_public'));
		$public->setDescription($translate->_('admin_layouts_dpublic'));
		
        // Submit
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel($translate->_('form_save'));
        
        $this->addElements(array($title, $key, $public, $submit));
    }
}
?>